package de.tudarmstadt.ukp.muip.fibqdojo;

import de.tudarmstadt.ukp.muip.fibqdojo.interfaces.IFIBQToken;
import de.tudarmstadt.ukp.muip.fibqdojo.interfaces.IStructureVisitor;

/**
 * A token comprising of the form, lemma and part of speech. A token can be set
 * to be simplified.
 * 
 * @author Tobias Horsmann
 */
public class Token implements IFIBQToken {

    private final String form;
    private String lemma;
    private String pos;
    private boolean simplify;

    public Token(String form) {
        this.form = form;
        this.pos = "";
        this.lemma = "";
    }

    /**
     * Retrieves the form as it was encoutered in the sentence
     */
    public String getForm() {
        return form;
    }

    public void setLemma(String lemma) {
        this.lemma = lemma;
    }

    public String getLemma() {
        return lemma;
    }

    public void setPartOfSpeech(String pos) {
        this.pos = pos;
    }

    public String getPartOfSpeech() {
        return pos;
    }

    @Override
    public void accept(IStructureVisitor visitor) {
        visitor.visit(this);
    }

    public void setSimplify(boolean simplify) {
        this.simplify = simplify;
    }
    
    public boolean isMarkedSimplified() {
        return simplify;
    }

}
